]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
gdm/loginDialog: Reset the greeter proxy on connection closed
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Wed, 17 Sep 2025 16:26:17 +0000 (18:26 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 5 Feb 2026 16:09:29 +0000 (17:09 +0100)
If gdm fails to start the display session the greeter proxy we are using
gets disconnected, however since commit 56ea95f2 we are now preserving
the greeter instance, and this will eventually lead to using an instance
of a disconnected proxy.

This eventually implies that after a login failure, we would never get
the `::session-opened` signal that actually triggers the session start.

And thus, even the user has properly authenticated, gdm will stick to
the authentication page.

So, instead of reverting such commit (that isn't wrong per se), consume
the greeter proxy connection `::closed` signal and use it to
re-initialize the greeter instance.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3885>
(cherry picked from commit ed6531fa79a67309f786893321c4b7af23f9d651)

js/gdm/loginDialog.js

index 3f2f512c9fbfdf748038e4ab9ebb4c7aa356817e..5aca896db9b7c067207280aac9b493faa5dadf6c 100644 (file)
@@ -1051,6 +1051,13 @@ export const LoginDialog = GObject.registerClass({
 
             this._greeter = this._gdmClient.get_greeter_sync(null);
 
+            this._greeter.get_connection().connectObject('closed', connection => {
+                connection.disconnectObject(this);
+                this._greeter.disconnectObject(this);
+                this._greeter = null;
+                this._ensureGreeterProxy();
+            }, this);
+
             this._greeter.connectObject(
                 'default-session-name-changed', this._onDefaultSessionChanged.bind(this),
                 'session-opened', this._onSessionOpened.bind(this),